package com.fdm.model.DAO;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.List;

public class PreparedStatementBuilder 
{
	public PreparedStatement createBuilder(Connection connection,
			String sql, List<Object> parameters) throws SQLException
	{
		PreparedStatement statement = connection.prepareStatement(sql);
		int i=1;
		for (Object obj : parameters)
		{
			statement.setObject(i, obj);
			i++;
		}
		return statement;
	}
}
